@import '../../style/themes/default.scss';

/* 数据表格头部工具栏 */
.ele-table-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;

  .ele-table-tool-title {
    flex: auto;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  .ele-tool {
    margin: 5px 0 5px auto;

    .ele-tool-item {
      font-size: 18px;
      padding: 0 2px;
      cursor: pointer;

      .el-dropdown > i {
        font-size: 18px;
      }
    }
  }

  &.ele-toolbar-form .ele-table-tool-title {
    margin-top: 0;
    margin-bottom: 0;

    .el-form-item,
    .ele-form-actions {
      margin-top: 5px;
      margin-bottom: 5px;
    }
  }

  &.ele-toolbar-actions .ele-table-tool-title {
    margin-top: 0;
    margin-bottom: 0;

    & > .el-button,
    & > .el-link,
    & > .el-dropdown,
    & > .el-tag,
    & > .ele-action {
      margin-top: 5px;
      margin-bottom: 5px;
    }
  }

  &:not(.ele-table-tool-default):not(.ele-table-tools-none)
    .ele-tool
    .ele-tool-item {
    padding: 6px;
    line-height: 1;
    text-align: center;
    border: 1px solid $--border-color-base;
    border-radius: 50%;
    font-size: 14px;

    .el-dropdown > i {
      font-size: 14px;
    }

    &:hover {
      color: $--color-primary;
      border-color: $--color-primary-light-8;
      background-color: $--color-primary-light-9;

      .el-dropdown > i {
        color: $--color-primary;
      }
    }
  }
}

// 带背景色
.ele-table-tool-default {
  margin-bottom: 0;
  padding: 5px 15px;
  box-sizing: border-box;
  background: $--table-header-background-color;
  border-top: 1px solid $--border-color-lighter;
  border-left: 1px solid $--border-color-lighter;
  border-right: 1px solid $--border-color-lighter;

  .ele-tool .ele-tool-item {
    font-size: 16px;
    padding: 5px 6px;
    border-radius: 2px;
    border: 1px solid $--border-color-light;
    box-sizing: border-box;
    line-height: 1;

    .el-dropdown > i {
      font-size: 16px;
    }
  }
}
